package TutorielChevalier;


import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class TestChevalier.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class TestChevalier
{
    /**
     * Default constructor for test class TestChevalier
     */
    public TestChevalier()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testVie()
    {
        Chevalier Lancelot = new Chevalier();
        Lancelot.setVie(100);
        assertEquals(100, Lancelot.getVie());
    }

    @Test
    public void testMana()
    {
        Chevalier Lancelot = new Chevalier();
        Lancelot.setMana(100);
        assertEquals(100, Lancelot.getMana());
    }

    @Test
    public void testAutoHeal()
    {
        Chevalier Lancelot = new Chevalier();
        Lancelot.setVie(100);
        Lancelot.setMana(100);
        Lancelot.autoHeal();
        assertEquals(90, Lancelot.getMana());
        assertEquals(110, Lancelot.getVie());
    }
}



